package cn.edu.xmu.oomall.comment.mapper;


import cn.edu.xmu.oomall.comment.mapper.po.CommentPo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface CommentPoMapper extends JpaRepository<CommentPo, Long> {
    Page<CommentPo> findByProductIdAndStatusEquals(Long id,Byte status , Pageable pageable);

    Optional<CommentPo> findByOrderItemId(Long orderItemId);

    Page<CommentPo> findByStatus(Byte status, Pageable pageable);

    Optional<CommentPo> findByPid(Long pid);
}
